<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Directorio 2010 - Administrador de Contenidos</title>
<link href="css/ext-all.css" rel="stylesheet" type="text/css" />
<link href="css/ext-air.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	color: #333333;
}
body, html {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>

	<script src="js/ext-base.js" type="text/javascript"></script>
	
	<script src="js/ext-all.js" type="text/javascript"></script>

<script type="text/javascript">
Ext.onReady(function(){

var formLogin =  new Ext.FormPanel({
	labelWidth: 70
	,url: 'login.php'
	,title: 'Login'
	,frame: true
	,width: 270
	,defaultType: 'textfield'
	,defaults: {width: 150}
	,items: [{
		fieldLabel: 'Login'
		,name: 'username'
		,allowBlank:false
	},{	
		fieldLabel: 'Password'
		,name: 'password'
		,inputType: 'password'
		,allowBlank:false
	}]
	,buttonAlign: 'center'
	,buttons: [{
            text: 'Entrar',
            handler: function() {
				formLogin.getForm().submit({
					waitMsg: 'Validando',
					reset: false,
					success: function() {
						window.location = "default.php";
					},
					failure: function() {
						Ext.Msg.alert('Error', 'El usuario o la contraseña no son validos.');
					}
				});
            }
        }]
	})
	formLogin.render('directorio-form');
});
</script>
</head>

<body style="padding-top:20%;">
	<table cellpadding="0" cellspacing="0" border="0" style="width:100%;">
    	<tr>
        	<td style="width:20%"></td>
        	<td style="width:275px;">	
            	<img src="imgages/logo.jpg" border="0" alt="Directorio"/>
            </td>
            <td>
            	<div id="directorio-form"></div>
            </td>
        	<td style="width:20%"></td>
        </tr>
    </table>
</body>
</html>
